function [n2,ValueArticle,ValueArticleTemp]=getArticleType(VecValue,n2)

ValueArticle='';
TestTemp=0;
TestTemp2=0;
ValueTemp=size(VecValue,1)-19;
ValueTemp2=size(VecValue,1)-17;
n2=n2-2;
ValueArticleTemp=0;
while n2<=ValueTemp&&TestTemp==0
    VecValueTemp3=VecValue(n2:n2+19,1);
    if strcmp(char(VecValueTemp3'),'<PublicationType UI=')==1
        while n2<=ValueTemp2&&strcmp(char(VecValue(n2,1)),'>')==0
            n2=n2+1;
        end
        n4=n2+1;
        while n2<=ValueTemp2&&TestTemp2==0
            VecValueTemp4=VecValue(n2:n2+17,1);
            if strcmp(char(VecValueTemp4'),'</PublicationType>')==1
                n5=n2-1;
                TestTemp2=1;
                VecValueTemp5=VecValue(n4:n5,1)';
                if strcmp(char(VecValueTemp5),'Journal Article')==1
                    ValueArticleTemp=1;
                end
                ValueArticle=[ValueArticle '/T_/' char(VecValueTemp5) '/T_/'];
            else
                if strcmp(char(VecValue(n2:n2+21,1)'),'</PublicationTypeList>')==1
                    n5=n2-1;
                    TestTemp2=1;
                    VecValueTemp5=VecValue(n4:n5,1)';
                    if strcmp(char(VecValueTemp5),'Journal Article')==1
                        ValueArticleTemp=1;
                    end
                    ValueArticle=[ValueArticle '/T_/' char(VecValueTemp5) '/T_/'];
                    TestTemp=1;
                end
            end
            n2=n2+1;
        end
        TestTemp2=0;
    else
        if strcmp(char(VecValue(n2:n2+21,1)'),'</PublicationTypeList>')==1
            TestTemp=1;
        end
    end
    n2=n2+1;
end